const express = require('express');
const { json } = require('express');

const admin = express.Router();

admin.get('/login', require('./admin/login-page'));
admin.post('/login', require('./admin/login'));
admin.get('/logout', require('./admin/logout'));

admin.get('/user', require('./admin/user-page'));
admin.get('/user-edit', require('./admin/user-edit-page'));
admin.post('/user-add', require('./admin/user-add'));
admin.post('/user-modify', require('./admin/user-modify'));
admin.get('/user-delete', require('./admin/user-delete'));

// 文章列表页面路由
admin.get('/article', require('./admin/article-page'));
// 文章编辑页面路由
admin.get('/article-edit', require('./admin/article-edit-page'))
// 文章提交路由
admin.post('/article-add', require('./admin/article-add'))




module.exports = admin; 